let { db } = require('../../tools');

module.exports = (req, res) => {
    // console.log(req.body);
    let { _id, data } = req.body;

    db.collection('power')
        .updateOne({ _id }, data)
            .then(data => {
                res.json({errno: 0, msg: '修改成功'})
            })
            .catch(err => res.json(err))
    
}